package com.cxc.entity;

import com.cxc.visit.Visit;

public class Apple implements Fruite{
    private int price = 100;

    public void setPrice(int price) {
        this.price = price;
    }

    public int getPrice() {
        return price;
    }

    public Apple(){

    }

    public Apple(int price) {
        this.price = price;
    }


    public int price() {
        return price;
    }

    public void draw() {
        System.out.print("苹果红富士");
    }

    public int accept(Visit visit){
        return visit.sell(this);//指针可以传递真实类型
    }

}
